﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace XinGuanERP.Models.Po.business;

public class Consumer : PrivateCommonEntity<string>, IEntityTypeBuilder<Consumer>
{
    public string? Name { get; set; }
    public string? Address { get; set; }
    public string? Phone { get; set; }
    public string? Contact { get; set; }
    public string? Email { get; set; }
    public int? Sort { get; set; }
    public void Configure(EntityTypeBuilder<Consumer> entityBuilder, DbContext dbContext, Type dbContextLocator)
    {
        entityBuilder.ToTable("biz_consumer");
        entityBuilder.HasKey(t => t.Id);
        entityBuilder.Property(t => t.Id).HasColumnName("id");
        entityBuilder.Property(t => t.CreateTime).HasColumnName("CREATETIME");
        entityBuilder.Property(t => t.UpdateTime).HasColumnName("UPDATETIME");
        entityBuilder.Property(t => t.CreateUserId).HasColumnName("CREATEUSERID");
        entityBuilder.Property(t => t.CreateUserName).HasColumnName("CREATEUSERNAME");
        entityBuilder.Property(t => t.UpdateUserId).HasColumnName("UPDATEUSERID");
        entityBuilder.Property(t => t.UpdateUserName).HasColumnName("UPDATEUSERNAME");
        entityBuilder.Property(t => t.Name).HasColumnName("name");
        entityBuilder.Property(t => t.Address).HasColumnName("address");
        entityBuilder.Property(t => t.Phone).HasColumnName("phone");
        entityBuilder.Property(t => t.Contact).HasColumnName("contact");
        entityBuilder.Property(t => t.Email).HasColumnName("email");
        entityBuilder.Property(t => t.Sort).HasColumnName("sort");
    }
}